<div id="view1">
    <div class="layui-card-body">
        <div class="layui-border-box layui-table-view house-table" lay-filter="demo" lay-id="admin-arctype" >
            <div class="layui-table-box">
                <div class="layui-table-body " >
                    <table cellspacing="0" cellpadding="0" border="0" class="layui-table layui-form" lay-skin="line" style="width: 100%">
                        <thead >
                        <tr>
                            <th class="w40 tc">
                                <div class="layui-table-cell w40 tc laytable-cell-checkbox">
                                    <input type="checkbox"  lay-filter="checkAll" id="checkAll"   lay-skin="primary" >
                                    <div class="layui-unselect layui-form-checkbox" lay-skin="primary"> <i class="layui-icon layui-icon-ok"></i></div>
                                </div>
                            </th>
                            <th class="w60 tc"> <div class="layui-table-cell w60 tc" ><span>ID</span></div></th>
                            <th class="wauto"> <div class="layui-table-cell wauto"><span>标题</span></div></th>
                            <th class="w100 tc"> <div class="layui-table-cell w100 tc"><span>所属栏目</span></div></th>
                            <th class="w80 tc"> <div class="layui-table-cell w80 tc"><span>推荐</span></div></th>
                            <th class="w100 tc"> <div class="layui-table-cell w100 tc"><span>浏览量</span></div></th>
                            <th class="w110 tc"> <div class="layui-table-cell w110 tc"><span>更新时间</span></div></th>
                            <th class="w80 tc"> <div class="layui-table-cell w80 tc"><span>排序</span></div></th>
                            <th class="w220 tc"> <div class="layui-table-cell w220 tc"><span>操作</span></div></th>
                        </tr>
                        </thead>
                        <tbody>
                        {empty name="list"}
                        <tr>
                            <td class="no-data" align="center" axis="col0" colspan="50">
                                <i class="fa fa-exclamation-circle"></i>没有符合条件的数据
                            </td>
                        </tr>
                        {else /}
                        {foreach name="list" item="vo" key="k" }
                        <tr>
                            <td>
                                <div class="layui-table-cell w40 tc laytable-cell-checkbox">
                                    <input type="checkbox" name="ids[]" value="{$vo.aid}" lay-skin="primary">
                                </div>
                            </td>
                            <td><div class="layui-table-cell w60 tc"> {$vo.aid} </div></td>
                            <td>
                                <div class="layui-table-cell wauto" title=" ">
                                    {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
                                    <a data-url="{:url($channelRow[$vo['channel']]['ctl_name'].'/edit',array('id'=>$vo['aid'],'typeid'=>$Request.param.typeid,'gourl'=>$gourl))}"  onclick="customvar_edit(this)" class="customvar_edit" style="{eq name="vo.is_b" value="1"} font-weight: bold;{/eq}">{$vo.title}</a>
                                    {else /}
                                    {$vo.title}
                                    {/eq}
                                    {assign name='showArcFlagData' value='$vo|showArchivesFlagStr'}
                                    {volist name='$showArcFlagData' id="vo1"}
                                    {eq name='$i' value='1'}<span style="color: red;">[{/eq}
													<b style="font-size: 12px;">{$vo1['small_name']}</b>
													{eq name='$i' value='$showArcFlagData|count'}]</span>{/eq}
                                    {/volist}
                                </div>
                            </td>
                            <td>
                                <div class="layui-table-cell w100 tc">
                                    <a href="{:url('Archives/index_archives', array('typeid'=>$vo['typeid']))}">{$vo.typename|default='<i class="red">数据出错！</i>'}</a>
                                </div>
                            </td>
                            <td>
                                <div class="layui-table-cell w80 tc">
                                    <input type="checkbox" name="is_recom"  data-id="{$vo.aid}" value="{$vo.is_recom}" lay-filter="is_recom" lay-skin="switch" lay-text="是|否" {if condition="$vo.is_recom" value="1"} class="yes" checked{else /}class="no"{/if}>
                                </div>
                            </td>
                            <td>
                                <div class="layui-table-cell w100 tc">
                                    {$vo.click}
                                </div>
                            </td>
                            <td><div class="layui-table-cell w110 tc">  {$vo.update_time|date='Y-m-d',###} </div></td>
                            <td>
                                <div class="layui-table-cell w80 tc">
                                    {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
                                    <input type="text" class="layui-input" onchange="changeTableVal('archives','aid','{$vo.aid}','sort_order',this);"  size="4"  value="{$vo.sort_order}" onkeyup="this.value=this.value.replace(/[^\d]/g,'');" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onchange="changeTableVal('archives','aid','{$vo.aid}','sort_order',this);" />
                                    {else /}
                                    {$vo.sort_order}
                                    {/eq}
                                </div>
                            </td>
                            <td>
                                <div class="layui-table-cell w220 tc">
                                    {eq name="'Archives@edit'|is_check_access" value="1"}
                                    <a data-url="{:url($channelRow[$vo['channel']]['ctl_name'].'/edit',array('id'=>$vo['aid'],'typeid'=>$Request.param.typeid,'channel'=>$vo['channel'],'gourl'=>$gourl))}" onclick="customvar_edit(this)" class="layui-btn layui-btn-xs customvar_edit" >
                                        <i class="layui-icon layui-icon-edit"></i>编辑
                                    </a>
                                    {/eq}
                                    {eq name="'Archives@del'|is_check_access" value="1"}
                                    <a onclick="delfun(this)" class="layui-btn layui-btn-danger layui-btn-xs " data-url="{:url('Archives/del')}" data-id="{$vo.aid}" >
                                        <i class="layui-icon layui-icon-delete"></i>删除
                                    </a>
                                    {/eq}
                                    <a href="{$vo.arcurl}" target="_blank" class="layui-btn layui-btn-xs" >
                                        <i class="layui-icon layui-icon-website"></i>浏览
                                    </a>
                                </div>
                            </td>
                        </tr>
                        {/foreach}
                        {/empty}
                        </tbody>
                    </table>
                </div>
            </div>
            <div class="layui-table-page">
                {eq name="'Archives@batch_copy'|is_check_access" value="1"}
                <a  data-url="{:url('Archives/batch_copy', array('typeid'=>$Request.param.typeid))}" onclick="func_batch_copy(this, 'ids');" id="batch_copy" class="layui-btn layui-btn-xs ">
                    <i class="layui-icon layui-icon-templeate-1"></i>批量复制
                </a>
                {/eq}

                {eq name="'Archives@move'|is_check_access" value="1"}
                <a  class="layui-btn layui-btn-xs" onclick="func_move(this,'ids')" id="batch_move_all" data-url="{:url('Archives/move', array('typeid'=>$Request.param.typeid))}">
                    <i class="layui-icon layui-icon-templeate-1"></i>批量移动
                </a>
                {/eq}
                {eq name="'Archives@del'|is_check_access" value="1"}
                <a  class="layui-btn layui-btn-danger layui-btn-xs" onclick="batch_del(this,'ids');" id="batch_del_all" data-url="{:url('Archives/del')}">
                    <i class="layui-icon layui-icon-delete"></i>批量删除
                </a>
                {/eq}
            </div>
            <div class="layui-col-md12 layui-col-sm12">
                <div id="pages"></div>
            </div>
        </div>
    </div>
</div>

<input type="hidden" id="count" value="{$pager->totalRows}">
<input type="hidden" id="limit" value="{$pager->listRows}">
<input type="hidden" id="curr" value="{$pager->nowPage}">
<input type="hidden" id="typeid" value="{$typeid}">
<input type="hidden" id="table_url" value="{:url('Custom/getAjaxHtml')}">
